<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <title>薪资汇总</title>
</head>
<body>
<table border="1">
  <tr>
    <th>部门</th>
    <th>第一月总工资</th>
    <th>第二月总工资</th>
    <th>总工资</th>
  </tr>
  <tr th:each="item : ${salary}">
    <td th:text="${item.deptName}"></td>
    <td th:text="${item.firstSal}"></td>
    <td th:text="${item.secondSal}"></td>
    <td th:text="${item.firstSal + item.secondSal}"></td>
  </tr>
</table>
<a href="/list">返回列表</a>
</body>
</html>
<!--<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>薪资汇总</title>
    &lt;!&ndash; 引入 Tailwind CSS 简化样式 &ndash;&gt;
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <style>
        .container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
        table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
        th, td { padding: 12px; text-align: left; border: 1px solid #e5e7eb; }
        th { background-color: #f3f4f6; font-weight: 500; }
        tr:nth-child(even) { background-color: #f9fafb; }
        .btn-return { display: inline-block; margin-top: 2rem; padding: 8px 16px; background-color: #3b82f6; color: white; text-decoration: none; border-radius: 4px; transition: background-color 0.3s; }
        .btn-return:hover { background-color: #2563eb; }
    </style>
</head>
<body class="bg-gray-100 font-sans">
<div class="container">
    <h1 class="text-2xl font-bold text-gray-900 mb-4">薪资汇总</h1>

    <table>
        <thead>
        <tr>
            <th>部门</th>
            <th>第一月总工资</th>
            <th>第二月总工资</th>
            <th>总工资</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="item : ${salary}">
            <td th:text="${item.deptName}" class="font-medium text-gray-800"></td>
            <td th:text="${item.firstSal}" class="text-gray-600">0</td>
            <td th:text="${item.secondSal}" class="text-gray-600">0</td>
            <td th:text="${item.firstSal + item.secondSal}" class="text-green-600 font-semibold">0</td>
        </tr>
        </tbody>
    </table>

    <a href="/list" class="btn-return mt-6">返回员工列表</a>
</div>
</body>
</html>-->
